<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@include file='checkLoggedIn.jsp'%>

<%@include file='templates/header.jsp'%>

<h1> Profile </h1>

<%@page import ="awesome.Manager.UserManager" %>
<%@page import ="awesome.Manager.User" %>

<%
UserManager um = new UserManager();
User user = um.getUser(Integer.parseInt(session.getAttribute("uid").toString()));

String mode = null;
if(request.getParameter("mode")!=null)
	mode = request.getParameter("mode").toString();
%>
<a href="myProfile.jsp?mode=view">View</a> | <a href="myProfile.jsp?mode=edit" >Edit</a>
<br />
<% 
if(mode!=null && mode.trim().equals("edit"))
	{
	System.out.println("EDIT selected");
	String country = user.getCountry();
	String state = user.getState();
	%> 
	<form action ="processMyProfile.jsp" method = "post">
		<table> 
				<td>First Name: </td>
				<td><input type="text" name = "first_name"  value="<%=user.getFirstName()%>"  /></td>
			</tr>
			<tr>
				<td>MI: </td>
				<td><input type="text" name = "MI" size = "1" value="<%=user.getMI()%>"  /></td>
			</tr>
			<tr>
				<td>Last Name: </td>
				<td><input type="text" name = "last_name" value="<%=user.getLastName()%>"  /></td>
			</tr>
			<tr>
				<td>Email: </td>
				<td><input type="text" name = "email" value="<%=user.getEmail()%>"  /></td>
			</tr>			
			<tr>
				<td>Country: </td>
				<td>
				<select style="width:147px;" name="country" >
          
<option value="US" <%if(country.equals("US")) out.println("selected"); %> >United States</option>
<option value="GB" <%if(country.equals("GB")) out.println("selected"); %>>United Kingdom</option>
<option value="CA" <%if(country.equals("GB")) out.println("selected"); %>>Canada</option>
<option value="AU" <%if(country.equals("GB")) out.println("selected"); %>>Australia</option>
<option value="AF" <%if(country.equals("GB")) out.println("selected"); %>>Afghanistan</option>
<option value="AL" <%if(country.equals("GB")) out.println("selected"); %>>Albania</option>
<option value="DZ" <%if(country.equals("GB")) out.println("selected"); %> >Algeria</option>
<option value="AS" <%if(country.equals("GB")) out.println("selected"); %> >American Samoa</option>

<option value="AD" <%if(country.equals("GB")) out.println("selected"); %> >Andorra</option>
<option value="AO" <%if(country.equals("GB")) out.println("selected"); %> >Angola</option>
<option value="AI" <%if(country.equals("GB")) out.println("selected"); %> >Anguilla</option>
<option value="AQ" <%if(country.equals("GB")) out.println("selected"); %> >Antarctica</option>
<option value="AG" <%if(country.equals("GB")) out.println("selected"); %> >Antigua And Barbuda</option>
<option value="AR" <%if(country.equals("GB")) out.println("selected"); %> >Argentina</option>
<option value="AM" <%if(country.equals("GB")) out.println("selected"); %> >Armenia</option>
<option value="AW" <%if(country.equals("GB")) out.println("selected"); %> >Aruba</option>
<option value="AU" <%if(country.equals("GB")) out.println("selected"); %> >Australia</option>

<option value="AT" <%if(country.equals("GB")) out.println("selected"); %> >Austria</option>
<option value="AZ" <%if(country.equals("GB")) out.println("selected"); %> >Azerbaijan</option>
<option value="BS" <%if(country.equals("GB")) out.println("selected"); %> >Bahamas</option>
<option value="BH" <%if(country.equals("GB")) out.println("selected"); %> >Bahrain</option>
<option value="BD" <%if(country.equals("GB")) out.println("selected"); %> >Bangladesh</option>
<option value="BB" <%if(country.equals("GB")) out.println("selected"); %> >Barbados</option>
<option value="BY" <%if(country.equals("GB")) out.println("selected"); %> >Belarus</option>
<option value="BE" <%if(country.equals("GB")) out.println("selected"); %> >Belgium</option>
<option value="BZ" <%if(country.equals("GB")) out.println("selected"); %> >Belize</option>

<option value="BJ" <%if(country.equals("GB")) out.println("selected"); %> >Benin</option>
<option value="BM" <%if(country.equals("GB")) out.println("selected"); %> >Bermuda</option>
<option value="BT" <%if(country.equals("GB")) out.println("selected"); %> >Bhutan</option>
<option value="BO" <%if(country.equals("GB")) out.println("selected"); %> >Bolivia</option>
<option value="BA" <%if(country.equals("GB")) out.println("selected"); %> >Bosnia And Herzegowina</option>
<option value="BW" <%if(country.equals("GB")) out.println("selected"); %> >Botswana</option>
<option value="BV" <%if(country.equals("GB")) out.println("selected"); %> >Bouvet Island</option>
<option value="BR" <%if(country.equals("GB")) out.println("selected"); %> >Brazil</option>
<option value="IO" <%if(country.equals("GB")) out.println("selected"); %> >British Indian Ocean Territory</option>

<option value="BN" <%if(country.equals("GB")) out.println("selected"); %> >Brunei Darussalam</option>
<option value="BG" <%if(country.equals("GB")) out.println("selected"); %> >Bulgaria</option>
<option value="BF" <%if(country.equals("GB")) out.println("selected"); %> >Burkina Faso</option>
<option value="BI" <%if(country.equals("GB")) out.println("selected"); %> >Burundi</option>
<option value="KH" <%if(country.equals("GB")) out.println("selected"); %> >Cambodia</option>
<option value="CM" <%if(country.equals("GB")) out.println("selected"); %> >Cameroon</option>
<option value="CA" <%if(country.equals("GB")) out.println("selected"); %> >Canada</option>
<option value="CV" <%if(country.equals("GB")) out.println("selected"); %> >Cape Verde</option>
<option value="KY" <%if(country.equals("GB")) out.println("selected"); %> >Cayman Islands</option>

<option value="CF" <%if(country.equals("GB")) out.println("selected"); %> >Central African Republic</option>
<option value="TD" <%if(country.equals("GB")) out.println("selected"); %> >Chad</option>
<option value="CL" <%if(country.equals("GB")) out.println("selected"); %> >Chile</option>
<option value="CN" <%if(country.equals("GB")) out.println("selected"); %> >China</option>
<option value="CX" <%if(country.equals("GB")) out.println("selected"); %> >Christmas Island</option>
<option value="CC" <%if(country.equals("GB")) out.println("selected"); %> >Cocos (Keeling) Islands</option>
<option value="CO" <%if(country.equals("GB")) out.println("selected"); %> >Colombia</option>
<option value="KM" <%if(country.equals("GB")) out.println("selected"); %> >Comoros</option>
<option value="CG" <%if(country.equals("GB")) out.println("selected"); %> >Congo</option>

<option value="CD" <%if(country.equals("GB")) out.println("selected"); %> >Congo, The Democratic Republic Of The</option>
<option value="CK" <%if(country.equals("GB")) out.println("selected"); %> >Cook Islands</option>
<option value="CR" <%if(country.equals("GB")) out.println("selected"); %> >Costa Rica</option>
<option value="CI" <%if(country.equals("GB")) out.println("selected"); %> >Cote D'Ivoire</option>
<option value="HR" <%if(country.equals("GB")) out.println("selected"); %> >Croatia (Local Name: Hrvatska)</option>
<option value="CY" <%if(country.equals("GB")) out.println("selected"); %> >Cyprus</option>
<option value="CZ" <%if(country.equals("GB")) out.println("selected"); %> >Czech Republic</option>
<option value="DK" <%if(country.equals("GB")) out.println("selected"); %> >Denmark</option>
<option value="DJ" <%if(country.equals("GB")) out.println("selected"); %> >Djibouti</option>

<option value="DM" <%if(country.equals("GB")) out.println("selected"); %> >Dominica</option>
<option value="DO" <%if(country.equals("GB")) out.println("selected"); %> >Dominican Republic</option>
<option value="TP" <%if(country.equals("GB")) out.println("selected"); %> >East Timor</option>
<option value="EC" <%if(country.equals("GB")) out.println("selected"); %> >Ecuador</option>
<option value="EG" <%if(country.equals("GB")) out.println("selected"); %> >Egypt</option>
<option value="SV" <%if(country.equals("GB")) out.println("selected"); %> >El Salvador</option>
<option value="GQ" <%if(country.equals("GB")) out.println("selected"); %> >Equatorial Guinea</option>
<option value="ER" <%if(country.equals("GB")) out.println("selected"); %> >Eritrea</option>
<option value="EE" <%if(country.equals("GB")) out.println("selected"); %> >Estonia</option>

<option value="ET" <%if(country.equals("GB")) out.println("selected"); %> >Ethiopia</option>
<option value="FK" <%if(country.equals("GB")) out.println("selected"); %> >Falkland Islands (Malvinas)</option>
<option value="FO" <%if(country.equals("GB")) out.println("selected"); %> >Faroe Islands</option>
<option value="FJ" <%if(country.equals("GB")) out.println("selected"); %> >Fiji</option>
<option value="FI" <%if(country.equals("GB")) out.println("selected"); %> >Finland</option>
<option value="FR" <%if(country.equals("GB")) out.println("selected"); %> >France</option>
<option value="FX" <%if(country.equals("GB")) out.println("selected"); %> >France, Metropolitan</option>
<option value="GF" <%if(country.equals("GB")) out.println("selected"); %> >French Guiana</option>
<option value="PF" <%if(country.equals("GB")) out.println("selected"); %> >French Polynesia</option>

<option value="TF" <%if(country.equals("GB")) out.println("selected"); %> >French Southern Territories</option>
<option value="GA" <%if(country.equals("GB")) out.println("selected"); %> >Gabon</option>
<option value="GM" <%if(country.equals("GB")) out.println("selected"); %> >Gambia</option>
<option value="GE" <%if(country.equals("GB")) out.println("selected"); %> >Georgia</option>
<option value="DE" <%if(country.equals("GB")) out.println("selected"); %> >Germany</option>
<option value="GH" <%if(country.equals("GB")) out.println("selected"); %> >Ghana</option>
<option value="GI" <%if(country.equals("GB")) out.println("selected"); %> >Gibraltar</option>
<option value="GR" <%if(country.equals("GB")) out.println("selected"); %> >Greece</option>
<option value="GL" <%if(country.equals("GB")) out.println("selected"); %> >Greenland</option>

<option value="GD" <%if(country.equals("GB")) out.println("selected"); %> >Grenada</option>
<option value="GP" <%if(country.equals("GB")) out.println("selected"); %> >Guadeloupe</option>
<option value="GU" <%if(country.equals("GB")) out.println("selected"); %> >Guam</option>
<option value="GT" <%if(country.equals("GB")) out.println("selected"); %> >Guatemala</option>
<option value="GG" <%if(country.equals("GB")) out.println("selected"); %> >Guernsey</option>
<option value="GN" <%if(country.equals("GB")) out.println("selected"); %> >Guinea</option>
<option value="GW" <%if(country.equals("GB")) out.println("selected"); %> >Guinea-Bissau</option>
<option value="GY" <%if(country.equals("GB")) out.println("selected"); %> >Guyana</option>
<option value="HT" <%if(country.equals("GB")) out.println("selected"); %> >Haiti</option>

<option value="HM" <%if(country.equals("GB")) out.println("selected"); %> >Heard And Mc Donald Islands</option>
<option value="VA" <%if(country.equals("GB")) out.println("selected"); %> >Holy See (Vatican City State)</option>
<option value="HN" <%if(country.equals("GB")) out.println("selected"); %> >Honduras</option>
<option value="HK" <%if(country.equals("GB")) out.println("selected"); %> >Hong Kong</option>
<option value="HU" <%if(country.equals("GB")) out.println("selected"); %> >Hungary</option>
<option value="IS" <%if(country.equals("GB")) out.println("selected"); %> >Iceland</option>
<option value="IN" <%if(country.equals("GB")) out.println("selected"); %> >India</option>
<option value="ID" <%if(country.equals("GB")) out.println("selected"); %> >Indonesia</option>
<option value="IQ" <%if(country.equals("GB")) out.println("selected"); %> >Iraq</option>

<option value="IE" <%if(country.equals("GB")) out.println("selected"); %> >Ireland</option>
<option value="IL" <%if(country.equals("GB")) out.println("selected"); %> >Israel</option>
<option value="IT" <%if(country.equals("GB")) out.println("selected"); %> >Italy</option>
<option value="JM" <%if(country.equals("GB")) out.println("selected"); %> >Jamaica</option>
<option value="JP" <%if(country.equals("GB")) out.println("selected"); %> >Japan</option>
<option value="JE" <%if(country.equals("GB")) out.println("selected"); %> >Jersey</option>
<option value="JO" <%if(country.equals("GB")) out.println("selected"); %> >Jordan</option>
<option value="KZ" <%if(country.equals("GB")) out.println("selected"); %> >Kazakhstan</option>
<option value="KE" <%if(country.equals("GB")) out.println("selected"); %> >Kenya</option>

<option value="KI" <%if(country.equals("GB")) out.println("selected"); %> >Kiribati</option>
<option value="KR" <%if(country.equals("GB")) out.println("selected"); %> >Korea, Republic Of</option>
<option value="KW" <%if(country.equals("GB")) out.println("selected"); %> >Kuwait</option>
<option value="KG" <%if(country.equals("GB")) out.println("selected"); %> >Kyrgyzstan</option>
<option value="LA" <%if(country.equals("GB")) out.println("selected"); %> >Lao People'S Democratic Republic</option>
<option value="LV" <%if(country.equals("GB")) out.println("selected"); %> >Latvia</option>
<option value="LB" <%if(country.equals("GB")) out.println("selected"); %> >Lebanon</option>
<option value="LS" <%if(country.equals("GB")) out.println("selected"); %> >Lesotho</option>
<option value="LR" <%if(country.equals("GB")) out.println("selected"); %> >Liberia</option>

<option value="LI" <%if(country.equals("GB")) out.println("selected"); %> >Liechtenstein</option>
<option value="LT" <%if(country.equals("GB")) out.println("selected"); %> >Lithuania</option>
<option value="LU" <%if(country.equals("GB")) out.println("selected"); %> >Luxembourg</option>
<option value="MO" <%if(country.equals("GB")) out.println("selected"); %> >Macau</option>
<option value="MK" <%if(country.equals("GB")) out.println("selected"); %> >Macedonia, Former Yugoslav Republic Of</option>
<option value="MG" <%if(country.equals("GB")) out.println("selected"); %> >Madagascar</option>
<option value="MW" <%if(country.equals("GB")) out.println("selected"); %> >Malawi</option>
<option value="MY" <%if(country.equals("GB")) out.println("selected"); %> >Malaysia</option>
<option value="MV" <%if(country.equals("GB")) out.println("selected"); %> >Maldives</option>

<option value="ML" <%if(country.equals("GB")) out.println("selected"); %> >Mali</option>
<option value="MT" <%if(country.equals("GB")) out.println("selected"); %> >Malta</option>
<option value="MH" <%if(country.equals("GB")) out.println("selected"); %> >Marshall Islands</option>
<option value="MQ" <%if(country.equals("GB")) out.println("selected"); %> >Martinique</option>
<option value="MR" <%if(country.equals("GB")) out.println("selected"); %> >Mauritania</option>
<option value="MU" <%if(country.equals("GB")) out.println("selected"); %> >Mauritius</option>
<option value="YT" <%if(country.equals("GB")) out.println("selected"); %> >Mayotte</option>
<option value="MX" <%if(country.equals("GB")) out.println("selected"); %> >Mexico</option>
<option value="FM" <%if(country.equals("GB")) out.println("selected"); %> >Micronesia, Federated States Of</option>

<option value="MD" <%if(country.equals("GB")) out.println("selected"); %> >Moldova, Republic Of</option>
<option value="MC" <%if(country.equals("GB")) out.println("selected"); %> >Monaco</option>
<option value="MN" <%if(country.equals("GB")) out.println("selected"); %> >Mongolia</option>
<option value="ME" <%if(country.equals("GB")) out.println("selected"); %> >Montenegro</option>
<option value="MS" <%if(country.equals("GB")) out.println("selected"); %> >Montserrat</option>
<option value="MA" <%if(country.equals("GB")) out.println("selected"); %> >Morocco</option>
<option value="MZ" <%if(country.equals("GB")) out.println("selected"); %> >Mozambique</option>
<option value="MM" <%if(country.equals("GB")) out.println("selected"); %> >Myanmar</option>
<option value="NA" <%if(country.equals("GB")) out.println("selected"); %> >Namibia</option>

<option value="NR" <%if(country.equals("GB")) out.println("selected"); %> >Nauru</option>
<option value="NP" <%if(country.equals("GB")) out.println("selected"); %> >Nepal</option>
<option value="NL" <%if(country.equals("GB")) out.println("selected"); %> >Netherlands</option>
<option value="AN" <%if(country.equals("GB")) out.println("selected"); %> >Netherlands Antilles</option>
<option value="NC" <%if(country.equals("GB")) out.println("selected"); %> >New Caledonia</option>
<option value="NZ" <%if(country.equals("GB")) out.println("selected"); %> >New Zealand</option>
<option value="NI" <%if(country.equals("GB")) out.println("selected"); %> >Nicaragua</option>
<option value="NE" <%if(country.equals("GB")) out.println("selected"); %> >Niger</option>
<option value="NG" <%if(country.equals("GB")) out.println("selected"); %> >Nigeria</option>

<option value="NU" <%if(country.equals("GB")) out.println("selected"); %> >Niue</option>
<option value="NF" <%if(country.equals("GB")) out.println("selected"); %> >Norfolk Island</option>
<option value="MP" <%if(country.equals("GB")) out.println("selected"); %> >Northern Mariana Islands</option>
<option value="NO" <%if(country.equals("GB")) out.println("selected"); %> >Norway</option>
<option value="OM" <%if(country.equals("GB")) out.println("selected"); %> >Oman</option>
<option value="PK" <%if(country.equals("GB")) out.println("selected"); %> >Pakistan</option>
<option value="PW" <%if(country.equals("GB")) out.println("selected"); %> >Palau</option>
<option value="PA" <%if(country.equals("GB")) out.println("selected"); %> >Panama</option>
<option value="PG" <%if(country.equals("GB")) out.println("selected"); %> >Papua New Guinea</option>

<option value="PY" <%if(country.equals("GB")) out.println("selected"); %> >Paraguay</option>
<option value="PE" <%if(country.equals("GB")) out.println("selected"); %> >Peru</option>
<option value="PH" <%if(country.equals("GB")) out.println("selected"); %> >Philippines</option>
<option value="PN" <%if(country.equals("GB")) out.println("selected"); %> >Pitcairn</option>
<option value="PL" <%if(country.equals("GB")) out.println("selected"); %> >Poland</option>
<option value="PT" <%if(country.equals("GB")) out.println("selected"); %> >Portugal</option>
<option value="PR" <%if(country.equals("GB")) out.println("selected"); %> >Puerto Rico</option>
<option value="QA" <%if(country.equals("GB")) out.println("selected"); %> >Qatar</option>
<option value="RE" <%if(country.equals("GB")) out.println("selected"); %> >Reunion</option>

<option value="RO" <%if(country.equals("GB")) out.println("selected"); %> >Romania</option>
<option value="RU" <%if(country.equals("GB")) out.println("selected"); %> >Russian Federation</option>
<option value="RW" <%if(country.equals("GB")) out.println("selected"); %> >Rwanda</option>
<option value="KN" <%if(country.equals("GB")) out.println("selected"); %> >Saint Kitts And Nevis</option>
<option value="LC" <%if(country.equals("GB")) out.println("selected"); %> >Saint Lucia</option>
<option value="VC" <%if(country.equals("GB")) out.println("selected"); %> >Saint Vincent And The Grenadines</option>
<option value="WS" <%if(country.equals("GB")) out.println("selected"); %> >Samoa</option>
<option value="SM" <%if(country.equals("GB")) out.println("selected"); %> >San Marino</option>
<option value="ST" <%if(country.equals("GB")) out.println("selected"); %> >Sao Tome And Principe</option>

<option value="SA" <%if(country.equals("GB")) out.println("selected"); %> >Saudi Arabia</option>
<option value="SN" <%if(country.equals("GB")) out.println("selected"); %> >Senegal</option>
<option value="RS" <%if(country.equals("GB")) out.println("selected"); %> >Serbia</option>
<option value="SC" <%if(country.equals("GB")) out.println("selected"); %> >Seychelles</option>
<option value="SL" <%if(country.equals("GB")) out.println("selected"); %> >Sierra Leone</option>
<option value="SG" <%if(country.equals("GB")) out.println("selected"); %> >Singapore</option>
<option value="SK" <%if(country.equals("GB")) out.println("selected"); %> >Slovakia (Slovak Republic)</option>
<option value="SI" <%if(country.equals("GB")) out.println("selected"); %> >Slovenia</option>
<option value="SB" <%if(country.equals("GB")) out.println("selected"); %> >Solomon Islands</option>

<option value="SO" <%if(country.equals("GB")) out.println("selected"); %> >Somalia</option>
<option value="ZA" <%if(country.equals("GB")) out.println("selected"); %> >South Africa</option>
<option value="GS" <%if(country.equals("GB")) out.println("selected"); %> >South Georgia, South Sandwich Islands</option>
<option value="ES" <%if(country.equals("GB")) out.println("selected"); %> >Spain</option>
<option value="LK" <%if(country.equals("GB")) out.println("selected"); %> >Sri Lanka</option>
<option value="SH" <%if(country.equals("GB")) out.println("selected"); %> >St. Helena</option>
<option value="PM" <%if(country.equals("GB")) out.println("selected"); %> >St. Pierre And Miquelon</option>
<option value="SR" <%if(country.equals("GB")) out.println("selected"); %> >Suriname</option>
<option value="SJ" <%if(country.equals("GB")) out.println("selected"); %> >Svalbard And Jan Mayen Islands</option>

<option value="SZ" <%if(country.equals("GB")) out.println("selected"); %> >Swaziland</option>
<option value="SE" <%if(country.equals("GB")) out.println("selected"); %> >Sweden</option>
<option value="CH" <%if(country.equals("GB")) out.println("selected"); %> >Switzerland</option>
<option value="TW" <%if(country.equals("GB")) out.println("selected"); %> >Taiwan</option>
<option value="TJ" <%if(country.equals("GB")) out.println("selected"); %> >Tajikistan</option>
<option value="TZ" <%if(country.equals("GB")) out.println("selected"); %> >Tanzania, United Republic Of</option>
<option value="TH" <%if(country.equals("GB")) out.println("selected"); %> >Thailand</option>
<option value="TG" <%if(country.equals("GB")) out.println("selected"); %> >Togo</option>
<option value="TK" <%if(country.equals("GB")) out.println("selected"); %> >Tokelau</option>

<option value="TO" <%if(country.equals("GB")) out.println("selected"); %> >Tonga</option>
<option value="TT" <%if(country.equals("GB")) out.println("selected"); %> >Trinidad And Tobago</option>
<option value="TN" <%if(country.equals("GB")) out.println("selected"); %> >Tunisia</option>
<option value="TR" <%if(country.equals("GB")) out.println("selected"); %> >Turkey</option>
<option value="TM" <%if(country.equals("GB")) out.println("selected"); %> >Turkmenistan</option>
<option value="TC" <%if(country.equals("GB")) out.println("selected"); %> >Turks And Caicos Islands</option>
<option value="TV" <%if(country.equals("GB")) out.println("selected"); %> >Tuvalu</option>
<option value="UG" <%if(country.equals("GB")) out.println("selected"); %> >Uganda</option>
<option value="UA" <%if(country.equals("GB")) out.println("selected"); %> >Ukraine</option>

<option value="AE" <%if(country.equals("GB")) out.println("selected"); %> >United Arab Emirates</option>
<option value="GB" <%if(country.equals("GB")) out.println("selected"); %> >United Kingdom</option>
<option value="GB" <%if(country.equals("GB")) out.println("selected"); %> >United States</option>
<option value="UM" <%if(country.equals("GB")) out.println("selected"); %> >United States Minor Outlying Islands</option>
<option value="UY" <%if(country.equals("GB")) out.println("selected"); %> >Uruguay</option>
<option value="UZ" <%if(country.equals("UZ")) out.println("selected"); %> >Uzbekistan</option>
<option value="VU" <%if(country.equals("VU")) out.println("selected"); %> >Vanuatu</option>
<option value="VE" <%if(country.equals("VE")) out.println("selected"); %> >Venezuela</option>
<option value="VN" <%if(country.equals("VN")) out.println("selected"); %> >Viet Nam</option>

<option value="VG" <%if(country.equals("VG")) out.println("selected"); %> >Virgin Islands (British)</option>
<option value="VI" <%if(country.equals("VI")) out.println("selected"); %> >Virgin Islands (U.S.)</option>
<option value="WF" <%if(country.equals("WF")) out.println("selected"); %> >Wallis And Futuna Islands</option>
<option value="EH" <%if(country.equals("EH")) out.println("selected"); %> >Western Sahara</option>
<option value="YE" <%if(country.equals("YE")) out.println("selected"); %> >Yemen</option>
<option value="ZM" <%if(country.equals("ZM")) out.println("selected"); %> >Zambia</option>
<option value="ZW" <%if(country.equals("ZW")) out.println("selected"); %> >Zimbabwe</option>

          </select>   </td>
			</tr>
			<tr>
				<td>Address: </td>
				<td><input type="text" name = "address" value="<%=user.getAddress()%>"  /></td>
			</tr>
			<tr>
				<td>City: </td>
				<td><input type="text" name = "city" value="<%=user.getCity()%>"  /></td>
			</tr>
			<tr>
				<td>State: </td>
				<td><select style="width:146px;" name="state" value="<%=user.getState()%>" id="STATE" onmousewheel="return false;" selected="">
          <option value="">Click to Select (if applicable)</option>
          <OPTION VALUE="AL" <%if(state.equals("AL")) out.println("selected"); %> >Alabama</OPTION>
<OPTION VALUE="AK" <%if(state.equals("AK")) out.println("selected"); %> >Alaska</OPTION>
<OPTION VALUE="AS" <%if(state.equals("AS")) out.println("selected"); %> >American Samoa</OPTION>
<OPTION VALUE="AZ" <%if(state.equals("AZ")) out.println("selected"); %> >Arizona</OPTION>
<OPTION VALUE="AR" <%if(state.equals("AR")) out.println("selected"); %> >Arkansas</OPTION>
<OPTION VALUE="AE" <%if(state.equals("AE")) out.println("selected"); %> >Armed Forces - Europe</OPTION>

<OPTION VALUE="AP" <%if(state.equals("AP")) out.println("selected"); %> >Armed Forces - Pacific</OPTION>
<OPTION VALUE="AA" <%if(state.equals("AA")) out.println("selected"); %> >Armed Forces - USA/Canada</OPTION>
<OPTION VALUE="CA" <%if(state.equals("CA")) out.println("selected"); %> >California</OPTION>
<OPTION VALUE="CO" <%if(state.equals("CO")) out.println("selected"); %> >Colorado</OPTION>
<OPTION VALUE="CT" <%if(state.equals("CT")) out.println("selected"); %> >Connecticut</OPTION>
<OPTION VALUE="DE" <%if(state.equals("DE")) out.println("selected"); %> >Delaware</OPTION>
<OPTION VALUE="DC" <%if(state.equals("DC")) out.println("selected"); %> >District of Columbia</OPTION>
<OPTION VALUE="FM" <%if(state.equals("FM")) out.println("selected"); %> >Federated States of Micronesia</OPTION>
<OPTION VALUE="FL" <%if(state.equals("FL")) out.println("selected"); %> >Florida</OPTION>

<OPTION VALUE="GA" <%if(state.equals("GA")) out.println("selected"); %> >Georgia</OPTION>
<OPTION VALUE="GU" <%if(state.equals("GU")) out.println("selected"); %> >Guam</OPTION>
<OPTION VALUE="HI" <%if(state.equals("HI")) out.println("selected"); %> >Hawaii</OPTION>
<OPTION VALUE="ID" <%if(state.equals("ID")) out.println("selected"); %> >Idaho</OPTION>
<OPTION VALUE="IL" <%if(state.equals("IL")) out.println("selected"); %> >Illinois</OPTION>
<OPTION VALUE="IN" <%if(state.equals("IN")) out.println("selected"); %> >Indiana</OPTION>
<OPTION VALUE="IA" <%if(state.equals("IA")) out.println("selected"); %> >Iowa</OPTION>
<OPTION VALUE="KS" <%if(state.equals("KS")) out.println("selected"); %> >Kansas</OPTION>
<OPTION VALUE="KY" <%if(state.equals("KY")) out.println("selected"); %> >Kentucky</OPTION>

<OPTION VALUE="LA" <%if(state.equals("LA")) out.println("selected"); %> >Louisiana</OPTION>
<OPTION VALUE="ME" <%if(state.equals("ME")) out.println("selected"); %> >Maine</OPTION>
<OPTION VALUE="MH" <%if(state.equals("MH")) out.println("selected"); %> >Marshall Islands</OPTION>
<OPTION VALUE="MD" <%if(state.equals("MD")) out.println("selected"); %> >Maryland</OPTION>
<OPTION VALUE="MA" <%if(state.equals("MA")) out.println("selected"); %> >Massachusetts</OPTION>
<OPTION VALUE="MI" <%if(state.equals("MI")) out.println("selected"); %> >Michigan</OPTION>
<OPTION VALUE="MN" <%if(state.equals("MN")) out.println("selected"); %>>Minnesota</OPTION>
<OPTION VALUE="MS" <%if(state.equals("MS")) out.println("selected"); %> >Mississippi</OPTION>
<OPTION VALUE="MO" <%if(state.equals("MO")) out.println("selected"); %> >Missouri</OPTION>

<OPTION VALUE="MT" <%if(state.equals("MT")) out.println("selected"); %> >Montana</OPTION>
<OPTION VALUE="NE" <%if(state.equals("NE")) out.println("selected"); %> >Nebraska</OPTION>
<OPTION VALUE="NV" <%if(state.equals("NV")) out.println("selected"); %> >Nevada</OPTION>
<OPTION VALUE="NH" <%if(state.equals("NH")) out.println("selected"); %> >New Hampshire</OPTION>
<OPTION VALUE="NJ" <%if(state.equals("NJ")) out.println("selected"); %> >New Jersey</OPTION>
<OPTION VALUE="NM" <%if(state.equals("NM")) out.println("selected"); %> >New Mexico</OPTION>
<OPTION VALUE="NY" <%if(state.equals("NY")) out.println("selected"); %> >New York</OPTION>
<OPTION VALUE="NC" <%if(state.equals("NC")) out.println("selected"); %> >North Carolina</OPTION>
<OPTION VALUE="ND" <%if(state.equals("ND")) out.println("selected"); %> >North Dakota</OPTION>

<OPTION VALUE="OH" <%if(state.equals("OH")) out.println("selected"); %> >Ohio</OPTION>
<OPTION VALUE="OK" <%if(state.equals("OK")) out.println("selected"); %> >Oklahoma</OPTION>
<OPTION VALUE="OR" <%if(state.equals("OR")) out.println("selected"); %> >Oregon</OPTION>
<OPTION VALUE="PA" <%if(state.equals("PA")) out.println("selected"); %> >Pennsylvania</OPTION>
<OPTION VALUE="PR" <%if(state.equals("PR")) out.println("selected"); %> >Puerto Rico</OPTION>
<OPTION VALUE="RI" <%if(state.equals("RI")) out.println("selected"); %> >Rhode Island</OPTION>
<OPTION VALUE="SC" <%if(state.equals("SC")) out.println("selected"); %> >South Carolina</OPTION>
<OPTION VALUE="SD" <%if(state.equals("SD")) out.println("selected"); %> >South Dakota</OPTION>
<OPTION VALUE="TN" <%if(state.equals("TN")) out.println("selected"); %> >Tennessee</OPTION>

<OPTION VALUE="TX" <%if(state.equals("TX")) out.println("selected"); %> >Texas</OPTION>
<OPTION VALUE="UT" <%if(state.equals("UT")) out.println("selected"); %> >Utah</OPTION>
<OPTION VALUE="VT" <%if(state.equals("VT")) out.println("selected"); %> >Vermont</OPTION>
<OPTION VALUE="VI" <%if(state.equals("VI")) out.println("selected"); %> >Virgin Islands</OPTION>
<OPTION VALUE="VA" <%if(state.equals("VA")) out.println("selected"); %> >Virginia</OPTION>
<OPTION VALUE="WA" <%if(state.equals("WA")) out.println("selected"); %> >Washington</OPTION>
<OPTION VALUE="WV" <%if(state.equals("WV")) out.println("selected"); %> >West Virginia</OPTION>
<OPTION VALUE="WI" <%if(state.equals("WI")) out.println("selected"); %> >Wisconsin</OPTION>
<OPTION VALUE="WY" <%if(state.equals("WY")) out.println("selected"); %> >Wyoming</OPTION>

<OPTION VALUE="AB" <%if(state.equals("AB")) out.println("selected"); %> >Alberta</OPTION>
<OPTION VALUE="BC" <%if(state.equals("BC")) out.println("selected"); %> >British Columbia</OPTION>
<OPTION VALUE="MB" <%if(state.equals("MB")) out.println("selected"); %> >Manitoba</OPTION>
<OPTION VALUE="NB" <%if(state.equals("NB")) out.println("selected"); %> >New Brunswick</OPTION>
<OPTION VALUE="NF" <%if(state.equals("NF")) out.println("selected"); %> >Newfoundland</OPTION>
<OPTION VALUE="MP" <%if(state.equals("MP")) out.println("selected"); %> >Northern Mariana Island	</OPTION>
<OPTION VALUE="NT" <%if(state.equals("NT")) out.println("selected"); %> >Northwest Territories</OPTION>
<OPTION VALUE="NS" <%if(state.equals("NS")) out.println("selected"); %> >Nova Scotia</OPTION>
<OPTION VALUE="ON" <%if(state.equals("ON")) out.println("selected"); %> >Ontario</OPTION>

<OPTION VALUE="PW" <%if(state.equals("PW")) out.println("selected"); %> >Palau Island</OPTION>
<OPTION VALUE="PE" <%if(state.equals("PE")) out.println("selected"); %> >Prince Edward Island</OPTION>
<OPTION VALUE="QC" <%if(state.equals("QC")) out.println("selected"); %> >Quebec</OPTION>
<OPTION VALUE="SK" <%if(state.equals("SK")) out.println("selected"); %> >Saskatchewan</OPTION>
<OPTION VALUE="YT" <%if(state.equals("YT")) out.println("selected"); %> >Yukon Territory</OPTION>
<OPTION VALUE="Australian Capital Territory" <%if(state.equals("Australian Capital Territory")) out.println("selected"); %> >Australian Capital Territory</OPTION>
<OPTION VALUE="Northern Territory" <%if(state.equals("Northern Territory")) out.println("selected"); %> >New South Wales</OPTION>
<OPTION VALUE="Northern Territory" <%if(state.equals("Northern Territory")) out.println("selected"); %> >Northern Territory</OPTION>
<OPTION VALUE="Queensland" <%if(state.equals("Queensland")) out.println("selected"); %> >Queensland</OPTION>

<OPTION VALUE="South Australia" <%if(state.equals("South Australia")) out.println("selected"); %> >South Australia</OPTION>
<OPTION VALUE="Tasmania" <%if(state.equals("Tasmania")) out.println("selected"); %> >Tasmania</OPTION>
<OPTION VALUE="Victoria" <%if(state.equals("Victoria")) out.println("selected"); %> >Victoria</OPTION>
<OPTION VALUE="Western Australia" <%if(state.equals("Western Australia")) out.println("selected"); %> >Western Australia</OPTION>

          </select> 
</td>
			</tr>
			<tr>
				<td>ZIP code: </td>
				<td><input type="text" name = "zipcode"  value="<%=user.getZip()%>"  /></td>
			</tr>
			<tr>
			<td></td><td><input type="submit" name = "Submit"  value="submit"  /></td>
			</tr>
		</table>
		
<% 
}
else
{
	System.out.println("View selected");
	%>

	<table>
				<td>First Name: </td>
				<td><%=user.getFirstName()%></td>
			</tr>
			<tr>
				<td>MI: </td>
				<td><%=user.getMI()%></td>
			</tr>
			<tr>
				<td>Last Name: </td>
				<td><%=user.getLastName()%></td>
			</tr>
			<tr>
				<td>Email: </td>
				<td><%=user.getEmail()%></td>
			</tr>			
			<tr>
				<td>Country: </td>
				<td><%=user.getCountry() %></td>
			</tr>
			<tr>
				<td>Address: </td>
				<td><%=user.getAddress() %></td>
			</tr>
			<tr>
				<td>City: </td>
				<td><%=user.getCity() %></td>
			</tr>
			<tr>
				<td>State: </td>
				<td><%=user.getState() %></td>
			</tr>
			<tr>
				<td>ZIP code: </td>
				<td><%=user.getZip() %></td>
			</tr>
			
		</table>



<%
}%>

<%@include file='templates/footer.jsp'%>